#version 330 core
out vec4 FragColor;

in vec2 TexCoords;

uniform sampler2D curTexture;
uniform sampler2D lastTexture;

void main()
{
    vec3 curColor = texture(curTexture, TexCoords).rgb;
    vec3 lastColor = texture(lastTexture, TexCoords).rgb;
    lastColor *= 0.9;
    FragColor = vec4(curColor + lastColor, 1.0);
    if(length(FragColor.rgb) < 0.01) FragColor.rgb = vec3(0);
} 